home *** CD-ROM | disk | FTP | other *** search
- Path: news.umbc.edu!ssopre1
- From: ssopre1@umbc.edu (Sunil )
- Newsgroups: comp.lang.c++
- Subject: [HLP] Easy Problem w/ Classes!
- Date: 21 Feb 1996 18:09:03 GMT
- Organization: University of Maryland, Baltimore County
- Message-ID: <4gfn3v$jp@news.umbc.edu>
- NNTP-Posting-Host: rpc16.gl.umbc.edu
- NNTP-Posting-User: ssopre1
- X-Newsreader: TIN [version 1.2 PL2]
-
- Hello all
- Heres a little problem that I need help with.
-
- // Point.h contains
- Class Point {
- private: int x;
- int y;
-
- public: Point();
- }
-
- // LineSeg.h contains
- class LineSeg{
- private:
- Point end;
- Point start;
- public:
- LineSeg();
- }
-
- // LineSeg.C contains
- LineSeg::LineSeg()
- {
- Point.end.x=0; // Are these valid?
- Point.end.y=0; // What do I need to add/del here?
- Point.start.x=0;
- Point.start.y=0;
- }
-
- Basically, LineSeg() is supposed to set starting and ending
- points to zero. Compiler goes berserkoid .. .
- --
- -sunil
- Suicide : Practice till I'm perfect
-